import pygame #@UnresolvedImport

class Goal(pygame.sprite.Sprite):
    ''' The goal object represents a goal position
        on the grid. Currently nanobots are suppossed
        to move to goal positions but eventually any
        thing could be defined as a goal.
    '''
    name = None
    loc = None
    color = (0,0,0)
    
    def __init__(self,name,loc,grid,gridsize):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.Surface([gridsize,gridsize])
        self.image.fill(self.color)
        self.rect = self.image.get_rect()
        self.rect.topleft = loc
        self.name = name
        grid.objects.append(self)
        
    def __repr__(self):
        return self.name